<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

@Require
<link rel="stylesheet" href="/resources/styles/form.css" type="text/css"></link>

@Require
<script type="text/javascript">
	function saveBlogEntry() {
		jQuery("#blogEntryForm").submit();
	
		return false;
	}
</script>
</head>

<body>
	@Header(title="Welcome!")
	<div></div>

	@ShowIf(adminUser)
	<div id="infobox">
		<div id="page">
			<h2>Blog Entry</h2>

			<form method="post" id="blogEntryForm">
				<input type="hidden" name="entry.id" value="${entry.id}" />

				<p>
					<label for="title">Title</label> <input type="text" id="title"
						name="entry.title" value="${entry.title}" />
				</p>

				<p>
					<label for="imageURL">Image URL</label> <input type="text"
						id="imageURL" name="entry.imageURL"
						value="${entry.imageURL}" />
				</p>

				<p>
					<label for="teaser">Teaser</label>
					<input type="text" id="teaser" name="entry.teaser" value="${entry.teaser}" />
				</p>
				
				<p>
					<label for="text">Text</label>
					<textarea id="text" name="entry.text">${entry.text}</textarea>
				</p>
				
				<p>
					<label for="skipHomePage">Skip Home Page</label>
					@ShowIf(entry.skipHomePage)
					<input type="checkbox" id="skipHomePage" name="entry.skipHomePage" value="true" checked/>
					
					@ShowIf(!entry.skipHomePage)
					<input type="checkbox" id="skipHomePage" name="entry.skipHomePage" value="true" />
				</p>

				<p>
					<label>&nbsp;</label>
					<a href="/admin/blogEntry" class="button" onclick="return saveBlogEntry();">Save Entry</a>
					<a href="/admin/" class="button" >Cancel</a>
				</p>
			</form>

		</div>
		<!--/page -->
		<div class="clear"></div>
	</div>
	<!--/infobox -->

	@Footer
	<div></div>
</body>
</html>